package com.swl.small.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.swl.common.utils.PageUtils;
import com.swl.small.product.entity.CategoryEntity;
import com.swl.small.product.vo.Catalog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author swl
 * @email songwinlong@163.com
 * @date 2020-05-08 23:09:53
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void removeMenuByIds(List<Long> longs);

    /**
     * 找到catelogId的完整路径
     * 父->子->孙
     * @param catelogId
     * @return
     */
    Long[] findCategoryPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categories();

    Map<String, List<Catalog2Vo>> getCatalogJson();

}

